 <link href="/Content/css/bootstrap.min.css" rel="stylesheet">

<div class="col-lg-12">
                    <div class="ibox float-e-margins">
                     
                        <div class="ibox-content">
                            <form  action="#" id="myform" method="post" class="form-horizontal"  enctype="multipart/form-data">
                               
								
								
									
								<div class="form-group"><label class="col-sm-2 control-label">分组</label>
                                    <div class="col-sm-10">
									
									<select class="" style="width:200px;height:40px;" id="zuid">
									<option value="0">全部</option>
									
								<volist name="types" id="vo">
										<option value="{$vo['id']}">{$vo['zuname']}</option>
									
														
												</volist>
												</select>
												&nbsp;&nbsp;&nbsp;&nbsp;
												   <button class="btn btn-primary" style="" id="sub" type="button" >提交</button>
									</div>
                                </div>
								
								
								
                               
							
							
                            </form>
                        </div>
                    </div>
                </div>
  <script src="/Content/js/jquery-2.1.1.js"></script>
  <script src="/Content/layer/layer.js"></script>
  <script src="https://cdn.socket.io/socket.io-1.2.1.js"></script>
<script>
var socket;
var type = "{$type}";
var text ="{$str}";
$(function(){
initsocket();
});

$("#sub").click(function(){
		var zuid =$("#zuid").val();
		
		$.post("/index.php/Home/Index/tongzhilog",{"content":text,"type":type,"zuid":zuid,"tvid":"0","typeid":"1"},function(data){
			if(data=="1"){
				var json = {};
				json.type=type;
				json.content=text;
				json.zuid= zuid;
				json.tvid =0;
				var str= JSON.stringify(json);
				console.log(str);
				socket.emit('broadcast',str);
				layer.msg("发送成功");
				var index = parent.layer.getFrameIndex(window.name);  
				parent.layer.close(index);  
			}
		});
		
	
});
function initsocket(){
	socket=io.connect('{$socket}');//与服务器进行连接		
}

</script>